﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
using DTO;

namespace DAL
{
    public class NguoiDung_DAL
    {
        static OleDbConnection ketnoi;
        public static DataTable Loaddangnhap(NguoiDung_DTO ngdung)
        {
            string truyvan = string.Format("Select * From DANGNHAP WHERE TENDANGNHAP ='{0}'", ngdung.TENDANGNHAP1);
            ketnoi = DataProvider.KetNoi();
            DataTable dt = DataProvider.LayDuLieuDataTable(truyvan, ketnoi);
            return dt;
        }
        public static DataTable layquyen(NguoiDung_DTO nguoidung)
        {
            string truyvan = string.Format("Select * From LOAI WHERE MALOAI ='{0}'", nguoidung.LOAI1);
            ketnoi = DataProvider.KetNoi();
            DataTable dt = DataProvider.LayDuLieuDataTable(truyvan, ketnoi);
            return dt;
        }
    }
}
